/**
 * 
 */
package com.estock.platform.task.jqka;

import java.util.Date;

import org.apache.log4j.Logger;

import com.estock.common.util.CommonUtil;
import com.estock.crawler.parse.JqkaStockHomeParser;
import com.estock.platform.task.support.ESJob;

/**
 * @author richard
 *
 */
public class JqkaParseTask extends ESJob {
	
	private static Logger logger = Logger.getLogger(JqkaParseTask.class);

	@Override
	protected void executeJob() {
		logger.info("start executing job: JqkaParseTask at " + new Date());
		try {
			JqkaStockHomeParser parser = new JqkaStockHomeParser();
			parser.parse();
		} catch (Exception e) {
			logger.info("error executing job: JqkaParseTask at " + new Date());
			System.out.println("error executing job: JqkaParseTask at " + new Date());
			if (!CommonUtil.isUnitTest) {
				errorTaskRun();
			}
		}
		logger.info("finished executing job: JqkaParseTask at " + new Date());
		System.out.println("finished executing job: JqkaParseTask at " + new Date());
		
	}
	
	public static void main(String[] args) {
		CommonUtil.isUnitTest = true;
		new JqkaParseTask().executeJob();
	}

}
